package pATT.profilingAlgorithm.PersonalSearcher;
/***************************************************************************
 *                                  Document                               * 
 *                       initial version by: Travis Bauer                  *
 *                      copyright (C) 2001 IGLU Research Group             *
 *                             trbauer@indiana.edu                         *
 ***************************************************************************/
/***************************************************************************
 * The licence for this code is included in LICENSE.txt.  If you did not   *
 * get this file with this distribution, request a copy from               *
 * iglu@cs.indiana.edu                                                     *
 ***************************************************************************/

/**
 * An interface for a document in the Information Retrieval Library.
 *
 * @author <a href="mailto:trbauer@indiana.edu">Travis Bauer</a>
 * @version 1.0
 * @since 1.0
 */
public interface Document {

  public static final int STYLE_ITALIC=0;
  public static final int STYLE_BOLD=1;
  public static final int STYLE_EMPHSIZED=10;
  public static final int STYLE_DEEMPHASIZED=11;

  /**
   * Returns the unmodified contents of this document.
   *
   * @return a <code>String</code> value
   */
  public String getFullContent();
  
  /**
   * Returns a string containing the content of this
   * document which might be indexible.  Must do the
   * following:
   * <ul>
   * <li>Drop all irrelevant punctuation</li>
   * <li>Words must be separated by at least one space</li>
   * <li>all letters are in lower case </li>
   * <li>Content which should not contribute to the index should
   * be dropped (like HTML tags).</li>
   * </ul>
   *
   * @return a <code>String</code> value
   */
  public String getIndexibleContent();
  

  /**
   * Changes the indexible content of the current document to
   * <code>content</code>.  Can be used by the DocumentFilters
   * to change the content.
   *
   */
  public void setIndexibleContent(String content);

  /**
   * Allows the user to query the document about text which is highlighted
   * in some way.  All classes implementing this interface must at lease
   * respond to the basic types listed above.  They may also implement
   * thier own specific type.
   *
   * @param style an <code>int</code> value
   * @return a <code>String</code> value
   */
  public String getStylizedText(int style);
  
  /**
   * The number of times w occurs in the indexible content.
   *
   * @param w a <code>String</code> value
   * @return an <code>int</code> value
   */
  public int numOccurs(String w);

  /**
   * The number of total words in the document.
   *
   * @return an <code>int</code> value
   */
  public int numWords();

  /**
   * The number of unique words in the indexible content of the document.
   *
   * @return an <code>int</code> value
   */
  public int numUniqueWords();
}